package com.wb.lambda.first;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class AppleService {

    private final Logger logger = LoggerFactory.getLogger(AppleService.class);


    public boolean service(Apple apple,Predicate<Apple> predicate) {
        logger.info(" apple : {}" , apple);
        boolean result = predicate.test(apple);
        if (result) {
            logger.info(" == ");
        } else {
            logger.info(" != ");
        }
        return result;
    }

    public void service(Apple apple,String str,Predicate<Apple> predicate) {
        logger.info(" apple : {} , str : {}" , apple , str);
    }
}

